/**
 * Created by Amaris on 2016/10/8.
 */

indexApp.factory("indexFactory", ['$http', function ($http) {
    var index = {};

    index.getCall = function (params, callback) {
        angularHttpGet($http, "/smtool_project/api/index/call", params, function (response) {
            callback(response);
        })
    };

    index.getOnline = function (params, callback) {
        angularHttpGet($http, "/smtool_project/api/index/online", params, function (response) {
            callback(response);
        })
    };

    index.getDevice = function (params, callback) {
        angularHttpGet($http, "/smtool_project/api/index/device", params, function (response) {
            callback(response);
        })
    };

    index.getFeedback = function (params, callback) {
        angularHttpGet($http, "/smtool_project/api/index/feedback", params, function (response) {
            callback(response);
        })
    };

    index.getNet = function (params, callback) {
        angularHttpGet($http, "/smtool_project/api/index/net", params, function (response) {
            callback(response);
        })
    };

    index.getDepInfo = function (params, callback) {
        angularHttpGet($http, "/smtool_project/api/index/depinfo", params, function (response) {
            callback(response);
        })
    };

    index.getRegister = function (params, callback) {
        angularHttpGet($http, "/smtool_project/api/index/register", params, function (response) {
            callback(response);
        })
    };

    index.getRegionalList = function (params, callback) {
        angularHttpGet($http, "/smtool_project/api/rp/getList", params, function (response) {
            callback(response);
        })
    };

    index.getProductStaffByDay = function (params, callback) {
        angularHttpGet($http, "/smtool_project/api/pd/getStaffByDay", params, function (response) {
            callback(response);
        })
    };

    index.getCloudStaffByDay = function (params, callback) {
        angularHttpGet($http, "/smtool_project/api/om/getStaffByDay", params, function (response) {
            callback(response);
        })
    };

    return index;
}]);
